<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');

## 登录
Router::post('/login', 'App\Controller\LoginController@login');
Router::post('/reg', 'App\Controller\LoginController@reg');


Router::addGroup(
    '/api',function (){

    ##退出登录
    Router::put('/logout','App\Controller\LoginController@logout');

    ##用户信息
    Router::put('/me','App\Controller\LoginController@me');

},['middleware' => [\App\Middleware\Authenticate::class]]);
